domdb.delete()
elif domid in doms:
try:
- self._new_domain(db.uuid, db, doms[domid])
+ self._new_domain(domdb["uuid"].getData(), db, doms[domid])
except Exception, ex:
log.exception("Error recreating domain info: id=%d", domid)
self._delete_domain(domid)
__exports__ = [
DBVar('id', ty='int'),
DBVar('name', ty='str'),
- DBVar('uuid', ty='str'),
DBVar('config', ty='sxpr'),
DBVar('start_time', ty='float'),
DBVar('state', ty='str'),
def __init__(self, uuid, path, db):
self.uuid = uuid
self.path = path + "/" + uuid
+
self.db = db
self.recreate = 0
self.bootloader = None
self.device_model_pid = 0
+ xstransact.Write(self.path, "uuid", self.uuid)
+
def setDB(self, db):
self.db = db
if dom <= 0:
raise VmError('Creating domain failed: name=%s' % self.vm.name)
log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom)
- # xc.domain_setuuid(dom, uuid)
xc.domain_setcpuweight(dom, cpu_weight)
xc.domain_setmaxmem(dom, mem_kb)